Skip to content

[dashboard] unskip platform/plugins/private/links/public/components/editor tests#262904

Merged
nreese merged 22 commits into
elastic:mainfrom
nreese:issue_253303
Apr 17, 2026
Merged

[dashboard] unskip platform/plugins/private/links/public/components/editor tests#262904
nreese merged 22 commits into
elastic:mainfrom
nreese:issue_253303

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Apr 13, 2026

Closes #253303

Test skipped because it some times timed out (took over 5000ms). The test is slow because it renders a lazy loaded component. This PR resolves the lazy load by moving DashboardNavigationOptionsEditor into a package. Unfortunately, this required creating 3 packages, schema, common, and a components package.

The tests were originally added in #211041. #211041 fixed a bug but did not resolve the code smell that caused the bug. The problem is that options state is getting stored at 2 different levels in 2 different useStates. This PR resolves that code smell by removing LinkOption component and moving it into LinkEditor and then removing duplicated linkOptions state.

Original test run (with lazy load component). Notice how first test case takes over a second because lazy load component has to load.
Screenshot 2026-04-13 at 3 32 25 PM

This PR test run (with component in package - so no lazy loading needed).
Screenshot 2026-04-13 at 3 34 26 PM

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 13, 2026

/ci

Comment thread src/platform/plugins/private/links/public/components/editor/link_editor.tsx Outdated
nreese and others added 6 commits April 13, 2026 15:49
This reverts commit 7091dd4.
…nk_editor.tsx

Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 13, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 14, 2026

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Apr 14, 2026

/ci

@nreese nreese marked this pull request as ready for review April 14, 2026 14:54
@nreese nreese requested a review from a team as a code owner April 14, 2026 14:54
@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// release_note:skip Skip the PR/issue when compiling release notes labels Apr 14, 2026
@nreese nreese added backport:version Backport to applied version labels v9.4.0 v9.5.0 labels Apr 14, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
links 158 159 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/dashboard-navigation-options-common - 4 +4
@kbn/dashboard-navigation-options-components - 6 +6
@kbn/dashboard-navigation-options-schema - 2 +2
dashboard 34 26 -8
total +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 1.1MB 1.1MB +30.0B
links 103.5KB 103.5KB -11.0B
total +19.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
dashboard 14 13 -1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dashboard 19.2KB 18.8KB -391.0B
Unknown metric groups

API count

id before after diff
@kbn/dashboard-navigation-options-common - 4 +4
@kbn/dashboard-navigation-options-components - 6 +6
@kbn/dashboard-navigation-options-schema - 2 +2
dashboard 130 122 -8
total +4

History

@nreese nreese merged commit e774326 into elastic:main Apr 17, 2026
20 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/24582964782

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 17, 2026
…ditor tests (elastic#262904)

Closes elastic#253303

Test skipped because it some times timed out (took over 5000ms). The
test is slow because it renders a lazy loaded component. This PR
resolves the lazy load by moving `DashboardNavigationOptionsEditor` into
a package. Unfortunately, this required creating 3 packages, `schema`,
`common`, and a `components` package.

The tests were originally added in
elastic#211041.
elastic#211041 fixed a bug but did not
resolve the code smell that caused the bug. The problem is that
`options` state is getting stored at 2 different levels in 2 different
`useStates`. This PR resolves that code smell by removing LinkOption
component and moving it into `LinkEditor` and then removing duplicated
`linkOptions` state.

Original test run (with lazy load component). Notice how first test case
takes over a second because lazy load component has to load.
<img width="1371" height="193" alt="Screenshot 2026-04-13 at 3 32 25 PM"
src="https://github.com/user-attachments/assets/0a9a58f6-b8ee-488d-ad9b-116467eb14a1"
/>

This PR test run (with component in package - so no lazy loading
needed).
<img width="1293" height="188" alt="Screenshot 2026-04-13 at 3 34 26 PM"
src="https://github.com/user-attachments/assets/5ff05378-ebe7-461f-a1e2-ecae57818944"
/>

---------

Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit e774326)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 17, 2026
…ents/editor tests (#262904) (#264206)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[dashboard] unskip
platform/plugins/private/links/public/components/editor tests
(#262904)](#262904)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2026-04-17T19:28:02Z","message":"[dashboard]
unskip platform/plugins/private/links/public/components/editor tests
(#262904)\n\nCloses
https://github.com/elastic/kibana/issues/253303\n\nTest skipped because
it some times timed out (took over 5000ms). The\ntest is slow because it
renders a lazy loaded component. This PR\nresolves the lazy load by
moving `DashboardNavigationOptionsEditor` into\na package.
Unfortunately, this required creating 3 packages, `schema`,\n`common`,
and a `components` package.\n\nThe tests were originally added
in\nhttps://github.com//pull/211041.\nhttps://github.com//pull/211041
fixed a bug but did not\nresolve the code smell that caused the bug. The
problem is that\n`options` state is getting stored at 2 different levels
in 2 different\n`useStates`. This PR resolves that code smell by
removing LinkOption\ncomponent and moving it into `LinkEditor` and then
removing duplicated\n`linkOptions` state.\n\nOriginal test run (with
lazy load component). Notice how first test case\ntakes over a second
because lazy load component has to load.\n<img width=\"1371\"
height=\"193\" alt=\"Screenshot 2026-04-13 at 3 32
25 PM\"\nsrc=\"https://github.com/user-attachments/assets/0a9a58f6-b8ee-488d-ad9b-116467eb14a1\"\n/>\n\nThis
PR test run (with component in package - so no lazy
loading\nneeded).\n<img width=\"1293\" height=\"188\" alt=\"Screenshot
2026-04-13 at 3 34
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5ff05378-ebe7-461f-a1e2-ecae57818944\"\n/>\n\n---------\n\nCo-authored-by:
macroscopeapp[bot]
<170038800+macroscopeapp[bot]@users.noreply.github.com>\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e7743267aa62989fff197c20bbbaeb778d330a6f","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:version","v9.4.0","v9.5.0"],"title":"[dashboard]
unskip platform/plugins/private/links/public/components/editor
tests","number":262904,"url":"https://github.com/elastic/kibana/pull/262904","mergeCommit":{"message":"[dashboard]
unskip platform/plugins/private/links/public/components/editor tests
(#262904)\n\nCloses
https://github.com/elastic/kibana/issues/253303\n\nTest skipped because
it some times timed out (took over 5000ms). The\ntest is slow because it
renders a lazy loaded component. This PR\nresolves the lazy load by
moving `DashboardNavigationOptionsEditor` into\na package.
Unfortunately, this required creating 3 packages, `schema`,\n`common`,
and a `components` package.\n\nThe tests were originally added
in\nhttps://github.com//pull/211041.\nhttps://github.com//pull/211041
fixed a bug but did not\nresolve the code smell that caused the bug. The
problem is that\n`options` state is getting stored at 2 different levels
in 2 different\n`useStates`. This PR resolves that code smell by
removing LinkOption\ncomponent and moving it into `LinkEditor` and then
removing duplicated\n`linkOptions` state.\n\nOriginal test run (with
lazy load component). Notice how first test case\ntakes over a second
because lazy load component has to load.\n<img width=\"1371\"
height=\"193\" alt=\"Screenshot 2026-04-13 at 3 32
25 PM\"\nsrc=\"https://github.com/user-attachments/assets/0a9a58f6-b8ee-488d-ad9b-116467eb14a1\"\n/>\n\nThis
PR test run (with component in package - so no lazy
loading\nneeded).\n<img width=\"1293\" height=\"188\" alt=\"Screenshot
2026-04-13 at 3 34
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5ff05378-ebe7-461f-a1e2-ecae57818944\"\n/>\n\n---------\n\nCo-authored-by:
macroscopeapp[bot]
<170038800+macroscopeapp[bot]@users.noreply.github.com>\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e7743267aa62989fff197c20bbbaeb778d330a6f"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262904","number":262904,"mergeCommit":{"message":"[dashboard]
unskip platform/plugins/private/links/public/components/editor tests
(#262904)\n\nCloses
https://github.com/elastic/kibana/issues/253303\n\nTest skipped because
it some times timed out (took over 5000ms). The\ntest is slow because it
renders a lazy loaded component. This PR\nresolves the lazy load by
moving `DashboardNavigationOptionsEditor` into\na package.
Unfortunately, this required creating 3 packages, `schema`,\n`common`,
and a `components` package.\n\nThe tests were originally added
in\nhttps://github.com//pull/211041.\nhttps://github.com//pull/211041
fixed a bug but did not\nresolve the code smell that caused the bug. The
problem is that\n`options` state is getting stored at 2 different levels
in 2 different\n`useStates`. This PR resolves that code smell by
removing LinkOption\ncomponent and moving it into `LinkEditor` and then
removing duplicated\n`linkOptions` state.\n\nOriginal test run (with
lazy load component). Notice how first test case\ntakes over a second
because lazy load component has to load.\n<img width=\"1371\"
height=\"193\" alt=\"Screenshot 2026-04-13 at 3 32
25 PM\"\nsrc=\"https://github.com/user-attachments/assets/0a9a58f6-b8ee-488d-ad9b-116467eb14a1\"\n/>\n\nThis
PR test run (with component in package - so no lazy
loading\nneeded).\n<img width=\"1293\" height=\"188\" alt=\"Screenshot
2026-04-13 at 3 34
26 PM\"\nsrc=\"https://github.com/user-attachments/assets/5ff05378-ebe7-461f-a1e2-ecae57818944\"\n/>\n\n---------\n\nCo-authored-by:
macroscopeapp[bot]
<170038800+macroscopeapp[bot]@users.noreply.github.com>\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e7743267aa62989fff197c20bbbaeb778d330a6f"}}]}]
BACKPORT-->

Co-authored-by: Nathan Reese <reese.nathan@elastic.co>
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.4.0 v9.5.0

Projects

None yet

5 participants